package com.youku.ast;

import java.util.List;

/**
 * 参数列表
 * 
 * @author loda
 *
 */
public class ArgumentAst extends Ast {

	public ArgumentAst() {
		super();
	}

	public ArgumentAst(Ast... asts) {
		super(asts);
	}

	public ArgumentAst(List<Ast> asts) {
		super(asts);
	}

	public List<Ast> arguments() {
		return children();
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();

		for (Ast ast : arguments()) {
			builder.append(ast).append(",");
		}

		if (builder.toString().endsWith(",")) {
			builder.deleteCharAt(builder.length() - 1);
		}

		return builder.toString();
	}

}
